import Layout from '@/layout'

export default {
  path: '/employees',
  component: Layout,
  // 给 layout 配置二级路由
  children: [
    {
      // 二级路由 path 通常需要加 /
      // 如果子路由的路径是 '' 空字符串, 当前路由默认匹配
      path: '',
      name: 'employees',
      component: () => import('@/views/employees/employees.vue'),
      meta: { title: '员工管理', icon: 'people' }
      // hidden: true
    },
    // 员工详情页
    {
      path: 'detail/:userId', // 查询参数不变
      // path: 'detail/:userId', // 路径传参的时候, 路径需要接收
      name: 'detail',
      component: () => import('@/views/employees/detail.vue'),
      hidden: true
    },
    {
      path: 'print/:id', // 二级默认路由
      component: () => import('@/views/employees/components/print.vue'),
      hidden: true
    }
  ]
}
